var sourceNum = readline();
var resultStr = '';
var resultCount = 0;
while(sourceNum >= 1){
    if(1 == sourceNum % 2){
        resultCount ++;
    }
    resultStr = (sourceNum % 2) + resultStr;
    sourceNum = (sourceNum / 2).toString().split('.')[0];
}
console.log(resultCount);
